core mem take
take
- Replaces
dest
with the default value ofT
, returning the previousdest
value - 말 그대로 변수가 가지고 있던 값을 훔치고 원래 있던 자리엔 기본값으로 채워넣겠다는거네.
- option take 메서드를 사용하면
Option
타입 변수가 가지고 있던 값을 훔치는 것이 가능하다!
take
dest
with the default value of T
, returning the previous dest
valueOption
타입 변수가 가지고 있던 값을 훔치는 것이 가능하다!